<?xml version="1.0" encoding="UTF-8" ?>
<objects>
  <object name="inventoryFormFactory" type="Inventory.FormFactory"/>
<object name="costCheckMethod" type="Inventory.MaBuCostCheckMethod"/>


<object name="barcodecollectForm" type="SBFUI.LocalizeFormFactoryObject"  lazy-init="true" singleton="false">
  <property name="Form">
  <object name="barcodecollectFormForm" factory-object="inventoryFormFactory" factory-method="CreateInstance" singleton="false">
    <constructor-arg>barcodecollect</constructor-arg>
  </object>
  </property>
</object>
<object name="coilinputForm" type="SBFUI.LocalizeFormFactoryObject"  lazy-init="true" singleton="false">
  <property name="Form">
  <object name="coilinputFormForm" factory-object="inventoryFormFactory" factory-method="CreateInstance" singleton="false">
    <constructor-arg>coilinput</constructor-arg>
  </object>
  </property>
</object>
  <object name="costCheckMethod" type="Inventory.MaBuCostCheckMethod"  lazy-init="true"/>
  <object name="inventoryService" type="Inventory.InventoryService">
    <property name="barcodeCollect">
      <ref object="barcodeCollect"/>
    </property>
    <property name="transactionManager">
      <ref object="transactionManager"/>
    </property>
    <property name="User">
      <ref object="user"/>
    </property>
    <property name="KeyGenerate">
      <ref object="keyGenerate"/>
    </property>
    <property name="AdoTemplate">
      <ref object="adoTemplate"/>
    </property>
    <property name="CostCheckMethod">
      <ref object="costCheckMethod"/>
    </property>
    <property name="QueryMap">
      <dictionary>
        <entry key="GetStoreHouse">
          <value>select id,name from inv_storehouse
          </value>
        </entry>
        <entry key="GetGoodByCode">
          <value>select orderno,barcode,coilno,length,colorname from coils_v where barcode='{1}' or packagebarcode='{1}'</value>
        </entry>
        <entry key="GetCoilsByPackageNo">
          <value>SELECT OrderNo, barcode,CoilNo, Length, colorname
FROM coils_v
WHERE (PackageNo = {1}) AND (OrderNo = '{2}')</value>
        </entry>

        <entry key="GetVendor">
          <value>select * from factoryinfo
          </value>
        </entry>
        <entry key="GetCustomer">
          <value>select * from customerinfo
          </value>
        </entry>
      </dictionary>
    </property>
  </object>

  <object name="instorehouseForm" type="SBFUI.LocalizeFormFactoryObject"  lazy-init="true" singleton="false">
    <property name="Form">
  <object name="instorehouseFormForm" factory-object="inventoryFormFactory" factory-method="CreateInstance" singleton="false">
    <constructor-arg>instorehouse</constructor-arg>
  <property name="BarcodeCollectForm"><ref object="barcodecollectForm"/></property>
  <property name="coilInputForm"><ref object="coilinputForm"/></property>

    <property name="RecordNavigate">
      <object name="instorehouseFomrRecordNavigate" type="sbf.PrimaryKeyRecordNavigate">
        <property name="tablename">inv_bill</property>
        <property name="primarykeycolumnName">entryshipmentno</property>
        <property name="conditions">substring(entryshipmentno,1,4)='SCRK'</property>
        <property name="adoTemplate">
          <ref object="adoTemplate"/>
        </property>
      </object>
    </property>
    <property name="InventoryService">
      <ref object="inventoryService"/>
    </property>
    <property name="queryBuilder">
      <ref object="queryBuilder"/>
    </property>

  </object>
    </property>
  </object>
  <object name="allotForm" type="SBFUI.LocalizeFormFactoryObject"  lazy-init="true" singleton="false">
    <property name="Form">
  <object name="allotFormForm" factory-object="inventoryFormFactory" factory-method="CreateInstance" singleton="false">
    <constructor-arg>allot</constructor-arg>
    <property name="BarcodeCollectForm"><ref object="barcodecollectForm"/></property>
    <property name="RecordNavigate">
      <object name="allotFormRecordNavigate" type="sbf.PrimaryKeyRecordNavigate">
        <property name="tablename">inv_bill</property>
        <property name="primarykeycolumnName">entryshipmentno</property>
        <property name="conditions">substring(entryshipmentno,1,4)='KCDB'</property>
        <property name="adoTemplate">
          <ref object="adoTemplate"/>
        </property>
      </object>
    </property>

    <property name="QueryBuilder">
      <ref object="queryBuilder"/>
    </property>
    <property name="InventoryService">
      <ref object="inventoryService"/>
    </property>
  </object>
    </property>
  </object>
  <object name="wholeForm" type="SBFUI.LocalizeFormFactoryObject"  lazy-init="true" singleton="false">
    <property name="Form">
    <object name="wholeFormForm" factory-object="inventoryFormFactory" factory-method="CreateInstance" description="销售出库" singleton="false">
      <constructor-arg>whole</constructor-arg>
        <property name="RecordNavigate">
            <object name="wholeFormRecordNavigate" type="sbf.PrimaryKeyRecordNavigate">
                <property name="tablename">inv_bill</property>
                <property name="primarykeycolumnName">entryshipmentno</property>
                <property name="conditions">substring(entryshipmentno,1,4)='SSCK'</property>
                <property name="adoTemplate"><ref object="adoTemplate"/></property>
            </object>
        </property>
        <property name="QueryBuilder">
            <ref object="queryBuilder"/>
        </property>
        <property name="InventoryService">
            <ref object="inventoryService"/>
        </property>
        <property name="BarcodeCollectForm"><ref object="barcodecollectForm"/></property>
    </object>  
    </property>
  </object>
  <object name="inventorycheckForm" type="SBFUI.LocalizeFormFactoryObject"  lazy-init="true" singleton="false">
    <property name="Form">
     <object name="inventorycheckFormForm"  factory-object="inventoryFormFactory" factory-method="CreateInstance"  description="当前库存查询"  singleton="false">
       <constructor-arg>inventorycheck</constructor-arg>
        <property name="QueryBuilder">
            <ref object="queryBuilder"/>
        </property>
        <property name="InventoryService">
            <ref object="inventoryService"/>
        </property>
    </object>
    </property>
  </object>

  <object name="balReportForm" type="SBFUI.LocalizeFormFactoryObject"  lazy-init="true" singleton="false">
    <property name="Form">
     <object name="balReportFormForm"  factory-object="inventoryFormFactory" factory-method="CreateInstance" description="库存盘点" singleton="false" >
       <constructor-arg>balreport</constructor-arg>
       <property name="BarcodeCollectForm"><ref object="barcodecollectForm"/></property>
       <property name="RecordNavigate">
         <object name="balReportFormRecordNavigate" type="sbf.PrimaryKeyRecordNavigate">
           <property name="tablename">inv_bill</property>
           <property name="primarykeycolumnName">entryshipmentno</property>
           <property name="conditions">substring(entryshipmentno,1,4)='KCPD'</property>
           <property name="adoTemplate">
             <ref object="adoTemplate"/>
           </property>
         </object>
       </property>
     
       <property name="QueryBuilder">
         <ref object="queryBuilder"/>
       </property>


       <property name="InventoryService">
         <ref object="inventoryService"/>
       </property>


     </object>
    </property>
  </object>
  <object name="backdrawForm" type="SBFUI.LocalizeFormFactoryObject"  lazy-init="true" singleton="false">
    <property name="Form">
     <object name="backdrawFormForm" factory-object="inventoryFormFactory" factory-method="CreateInstance" singleton="false">
                <constructor-arg>backdraw</constructor-arg>
                <property name="BarcodeCollectForm"><ref object="barcodecollectForm"/></property>
                                            <property name="RecordNavigate">
                                                <object name="backdrawFomrRecordNavigate" type="sbf.PrimaryKeyRecordNavigate">
                                                    <property name="tablename">inv_bill</property>
                                                    <property name="primarykeycolumnName">entryshipmentno</property>
                                                    <property name="conditions">substring(entryshipmentno,1,4)='XSTH'</property>
                                                    <property name="adoTemplate"><ref object="adoTemplate"/></property>
                                                </object>
                                            </property>
                                            <property name="InventoryService">
                                                <ref object="inventoryService"/>
                                            </property>
                                            <property name="queryBuilder">
                                                <ref object="queryBuilder"/>
                                            </property>

                                            </object>
   
    </property>
  </object>
</objects>